<%--
  Created by IntelliJ IDEA.
  User: oldliu
  Date: 2022/7/1
  Time: 10:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>获得注册信息</title>
</head>
<body>
  <h1>您的注册信息如下:</h1>
  <%
      String ip=request.getRemoteHost();
      request.setCharacterEncoding("utf-8");
      String name=request.getParameter("uname");
      String loginname=request.getParameter("loginname");
      String pass=request.getParameter("upass");
      String[] like=request.getParameterValues("aihao");

  %>
  <h1>ip:<%=ip%></h1>
<p>
    <%=name%>,密码是：<%=pass%>，登录名是<%=loginname%><br/>
    爱好：
    <%
        for(int i=0;like!=null&&i<like.length;i++){
            out.print(like[i]+"&nbsp;");
        }
    %>

 <%
     if(name.length()>=2 &&pass.length()>=8){
         //去学生显示页
         //转发
        request.getRequestDispatcher("student1.jsp").forward(request,response);
        //重定向
         // response.sendRedirect("student1.jsp");
     }else{
         out.print("密码太短！@");

         %>
    <a href='studentreg.jsp'>返回</a>
    <%
     }

 %>
</p>
</body>
</html>
